﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/BookClub.Master" AutoEventWireup="true" CodeBehind="topic.aspx.cs" Inherits="BookClubIt.topic" MaintainScrollPositionOnPostback="true" %>
<%@ Register TagPrefix="uc" TagName="clubnav" Src="~/UserControls/clubmenu.ascx" %>
<%@ Register TagPrefix="uc" TagName="joinbox" Src="~/UserControls/joinbox.ascx"  %>
<%@ Register TagPrefix="uc" TagName="currentbook" Src="~/UserControls/currentbook.ascx"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript">
 $(document).ready(function () {
    $(".commentBox").val('');
});
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
 <asp:ScriptManager ID="ScriptManager1" runat="server" />
<div class="row">
<div class="left-nav">
<uc:clubnav id="clubnav"  runat="server" />
</div>

<div class="content">
<a href="javascript:history.go(-1)"><< Back to Topics</a>

<h1><small><asp:Label ID="lblTopicTitle" runat="server" /></small></h1>

<div class="comment-list">
<asp:panel ID="pnlNoComments" runat="server" Visible="false" CssClass="no-info">
<h3>There are no comments</h3>
<p>Please add a comment to start this discussion.</p>
</asp:panel>


<asp:GridView ID="grdTopicComments"
 OnRowDataBound="grdTopicComments_OnRowDataBound"
  runat="server"
   AutoGenerateColumns="false"
    AlternatingRowStyle-CssClass="alt"
     CssClass="table topic-comments"
     GridLines="None"
      ShowHeader="false"
      OnRowCommand="grdTopicComments_RowCommand">
<Columns>


    <asp:TemplateField ItemStyle-CssClass="avatar-row">
           <ItemTemplate>
           <asp:Image ID="imgMemberAvatar" runat="server" Width="50px" Height="50px" />
            <asp:HyperLink ID="lnkMember" runat="server" />
            <label class="date"><asp:Label ID="lblCommentDate" runat="server" /></label>
           </ItemTemplate>
      </asp:TemplateField>

          <asp:TemplateField ItemStyle-CssClass="comment-row">
           <ItemTemplate>
    
            <p>    <asp:Button ID="btnDeleteComment" runat="server" CssClass="btn btn-mini btn-danger" CommandName="DeleteComment" Text="x" Visible="false" />
          <asp:HiddenField ID="hdnCommentId" runat="server" />   
             <img src="../images/comment_tip.png" alt="book tip" class="comment-tip"/>
             <asp:Label ID="lblComment" runat="server" />
            
          
          
          </p>
           
           </ItemTemplate>
      </asp:TemplateField>

</Columns>
</asp:GridView>


<asp:Panel ID="pnlLogInToComment" CssClass="alert" runat="server" Visible="false">
<h3>Please log in to comment</h3>
<p>You must be logged in to comment. Please <a href="../login.aspx">log in</a> or <a href="../register.aspx">create an account</a> to be a part of this discussion.</p>
</asp:Panel>

<asp:Panel ID="pnlCommentBox" runat="server" CssClass="comment-box" Visible="false">
<label>Add a comment:</label>
 <textarea runat="server"  id="txtreaComment" class="commentBox" cols="67" rows="4" ></textarea>
<asp:button ID="btnAddComment" runat="server" CssClass="btn btn-primary" Text="Add comment" style="float:right" OnClick="btnAddComment_Click"   />
</asp:Panel>
</div>
</div>
<div class="right-sidebar">
<uc:joinbox id="joinbox"  runat="server" />


<uc:currentbook id="currentbook"  runat="server" />

 <script type="text/javascript"><!--
     google_ad_client = "ca-pub-1776925204000985";
     /* bci_250_right */
     google_ad_slot = "4159600899";
     google_ad_width = 250;
     google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>

</div>
</asp:Content>
